package task3;


import java.util.Scanner;

public class test1 {

    static Scanner input=new Scanner(System.in);

    public static void main(String[] args) {
        String content= input.nextLine();
        System.out.println(match(content));
    }
    private static String match(String content){
        int count=0;


        for(int i=0;i<content.length();i++){

            char ch=content.charAt(i);
            if(ch=='('){
                count++;
            }else if(ch==')'){
                count--;
            }
        }

        return count==0?"Yes!":"No!";
    }
}
